var timeout = 1000*60*10;
var httpService = {

    get:function(param){
        var deferred = $.Deferred();
        var ajax = $.ajax({
            url:param.url,
            type:"get",
            data:param.data,
            timeout:param.timeout || timeout,
            dataType:param.dataType||"json",
        })
        ajax.success(function(response){
            deferred.resolve(response);
        });
        ajax.error(function(xhr){
            deferred.reject(xhr);
        })
        return deferred.promise();
    },
    post:function(param){
        var deferred = $.Deferred();
   //     alert(param.data);
    //    console.log(param.data);
        var ajax = $.ajax({
            url:param.url,
            type:"post",
         // data:JSON.stringify(param.data),
             data:param.data,
     //       data:{loginName:"555454",age:"5,6",isGrandFather: "true"},
     //       timeout:param.timeout || timeout,
      //      dataType:param.dataType||"json",
      //      contentType:"application/json"
        })
        ajax.success(function(response){
            deferred.resolve(response);
        });
        ajax.error(function(xhr){
            deferred.reject(xhr);
        })
        return deferred.promise();
    },
}